package 常用字节流;

import java.io.FileInputStream;
import java.io.IOException;
//FileInputStream
//文件字节输入流
public class FileInputStreamExample {
    public static void main(String[] args) {
        try (FileInputStream fis = new FileInputStream("test.txt")) {
            int data;
            // 读取文件中的字节数据，直到文件末尾
            while ((data = fis.read()) != -1) {
                System.out.print((char) data);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}